#!/usr/bin/python
import os, pygame
from pygame.locals import *

class GuifaSound:
    def __init__(self):
        self.sounddic = {
                "kill":self.loadsound("kill.ogg"),
                "move":self.loadsound("move.ogg"),
                "select":self.loadsound("select.ogg"),
                "resurgence":self.loadsound("resurgence.ogg")
                }

    def loadsound(self, name):
        fullname = os.path.join("./data", name)

        try:
            sound = pygame.mixer.Sound(fullname)
        except pygame.error, message:
            print "Cannot load sound:", fullname
            raise SystemExit, message
        return sound

    def get_sound(self, name):
        return self.sounddic[name]

